package cn.medemede.springbootdemo1.controller;

import cn.medemede.springbootdemo1.domain.GirlBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
public class HelloController {

    @Autowired
    private GirlBean girlBean;


    @RequestMapping(value = "/hello/{id2}", method = RequestMethod.GET)
    public String say(@RequestParam(value = "id1", required = false, defaultValue = "0") int id1, @PathVariable("id2") int id2) {
        return "id1:" + id1 + "  id2:" + id2 + " " + girlBean.toString();
    }

}
